import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return MaterialApp(
      title: 'Text Widget',
      home: Scaffold(
        body: Center(
          child: Container(
            child: new Text(
              'Hello Flutter',
              style: TextStyle(fontSize: 20.0, color: Colors.white),
            ),
            alignment: Alignment.topLeft,
            //对齐方式
            width: 500.0,
            height: 250.0,
//            color: Colors.blue,
          decoration: new BoxDecoration(  //渐变色
            gradient: const LinearGradient(colors: [Colors.blue,Colors.red]),
            border: Border.all(width: 2,color: Color.fromARGB(100, 100, 100, 100))
          ),
            //背景颜色
//           padding: const EdgeInsets.all(10.0),
            padding: const EdgeInsets.fromLTRB(30, 50, 1, 0), //内边距离
            margin: const EdgeInsets.all(30),
          ),
        ),
      ),
    );
  }
}
